from pyspark.sql.functions import *

from bigdata.labels import Hive_process

if __name__ == '__main__':
    #单笔最高
    hive = Hive_process.Hive_process()
    table_name = 'shopping.tbl_orders'
    orders_df = hive.read(table_name)
    maxConsumption_df = orders_df.groupby('memberId')\
    .agg(
        max('productAmount')
    )
    maxConsumption_df.show()

